Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added switch to set variable as secret #380

Merged

Conversation

pim-simons
Copy link
Contributor

Adds a switch to set a variable as a secret.

Closes #379

@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for arcus-scripting ready!

Name Link
🔨 Latest commit 7096e07
🔍 Latest deploy log https://app.netlify.com/sites/arcus-scripting/deploys/6436549a6d1b0100088c951b
😎 Deploy Preview https://deploy-preview-380--arcus-scripting.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@pim-simons pim-simons added enhancement New feature or request area:devops All issues related to Azure DevOps labels Apr 11, 2023
@pim-simons
Copy link
Contributor Author

Looking at the code and testing the currently released version, it does not seem that this task worked correctly...
I changed Write-Host "#vso[task.setvariable variable=$Name] $Value" to Write-Host "##vso[task.setvariable variable=$Name] $Value". Note the extra #, otherwise the variable is not stored in the pipeline.

Copy link
Member

@stijnmoreels stijnmoreels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, so this is a bugfix and feature in one, great! 😄
Since this only works on a build server, it is indeed a bit harder to tests locally. Maybe we could check if there is an environment variable available after running the command instead of asserting on the Write-Host?

@pim-simons pim-simons merged commit e86ef48 into arcus-azure:main Apr 12, 2023
@pim-simons pim-simons deleted the feature/devops-variable-secret branch April 12, 2023 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:devops All issues related to Azure DevOps enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting Azure DevOps variable as secret
2 participants